﻿#pragma once
#include <QMutex>
#include <QList>

#define journal (SystemJournalCore::GetInstance())

enum class JournalType {
	journal_type_trace = 0,
	journal_type_warning = 1,
	journal_type_error = 2,
};

class SystemJournalCore
{
public:
	SystemJournalCore();
	~SystemJournalCore();
	static SystemJournalCore* GetInstance();
	void WriteTraceJournal(JournalType type, const QString& str);
	QStringList ReadTraceJournal(JournalType type);

private:
	QList<QString> m_trace;
	QList<QString> m_warnning;
	QList<QString> m_error;

	QMutex trace;
	QMutex warn;
	QMutex error;
};
